import { Rule } from "./types";

export const LibrariesRuleList: Rule[] = [
    {
        id: "ForbiddenPublicDataClass",
        descEn: `Data classes are bad for binary compatibility in public APIs. Avoid using them.

        This rule is aimed at library maintainers. If you are developing a final application you can ignore this issue.`,
        descCn: "",
        active: true,
        debt: "20min",
        paramList: [
            {
                param: "ignorePackages",
                descEn: "ignores classes in the specified packages.",
                descCn: "",
                defaultValue: ['*.internal', '*.internal.*'],
            }
        ],
        url: "https://detekt.dev/docs/rules/libraries#forbiddenpublicdataclass",
    },
    {
        id: "LibraryCodeMustSpecifyReturnType",
        descEn: "Functions/properties exposed as public APIs of a library should have an explicit return type. Inferred return type can easily be changed by mistake which may lead to breaking changes.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/libraries#librarycodemustspecifyreturntype",
    },
    {
        id: "LibraryEntitiesShouldNotBePublic",
        descEn: "Library typealias and classes should be internal or private.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/libraries#libraryentitiesshouldnotbepublic",
    },
];